(1) Field of the Invention
The present invention relates to integrated circuits, particularly to a photocoupling signal detection circuit for a computer mouse.
(2) Description of the Prior Art
According to the movement of a computer mouse rolling ball, a phototransistor has to detect the movement, and a detection circuit determines whether the phototransistor is turned on or turned off for comparing with a reference voltage, so that a state signal is generated for the other control circuit of the computer mouse. FIG. 1 is a schematic diagram of a typical detection circuit of the optical coupling input signal for a computer mouse. The conventional detection circuit includes a comparator 4 for comparing a fixed reference voltage 5 with the output signal of a phototransistor 1 to produce signals representative of the conduction/cut-off status of phototransistor. Reference voltage 5 is fixed at a predetermined level that is used to decide if the phototransistor 1 is conducted or cut-off. In operation, if the level of the noninverting input of comparator 4 is higher than the fixed reference voltage 5, the output signal of the comparator 4 will be "HIGH". At this time, the phototransistor 1 is conducted. On the contrary, if the level of the noninverting input of comparator 4 is lower than the fixed reference voltage 5, the output signal of the comparator 4 will be "LOW". At this time, the phototransistor 1 is cut-off. So the output signal of the comparator 4 can represent whether the phototransistor 1 is conducted or cut-off. It is an important drawback that the detection circuit can't detect the corrected input signal when the level of the input signal voltage of phototransistor 1 is over or under the level of the fixed reference voltage 5.
FIG. 2 is a block diagram of a prior art detection circuit 6 of reference voltage for a computer mouse. There is shown an automatic detection circuit which comprises a voltage divider 70 connected to an analog multiplexer 71 as a D/A converter in FIG. 2. The analog multiplexer 71 is connected to two comparators 72 for comparing with the signal VIN+, and the output signals of the two comparators 72 are connected to an input voltage tracking circuit 73 which is connected with an up/down counter 74 for counting the input voltage. The signals between the input voltage tracking circuit 73 and the up/down counter 74 are connected to a maximum detection circuit 75, and the maximum detection circuit 75 is commonly connected with a maximum latch circuit 77 and a minimum latch circuit 78. A clock 76 is connected to both of the input voltage tracking circuit 73 and the maximum detection circuit 75, and the output signal of up/down counter 74 is connected to the maximum latch circuit 77, the minimum latch circuit 78, and the analog multiplexer 71 at the same time. An averager 79 is connected with the maximum latch circuit 77 and the minimum latch circuit 78 for taking the average of maximum and minimum signals, then it is also connected to a signal latch circuit 80 for latching the average value. The output signal of signal latch circuit 80 is connected to an analog multiplexer 81 connected with a voltage divider 82, and the output signal of the analog multiplexer 81 is the reference voltage that we have to use in computer mouse. In brief, the prior art detection circuit 6 is used to detect the maximum or minimum of the input analog signal, and to calculate the average value. Finally, the detection circuit 6 produces a reference voltage.
Obviously, the predescription shows that the detection circuit 6 is a very complicated method for generating the reference voltage. Moreover, it increases the cost and complexity of the circuit, because the detection circuit 6 includes too many circuit elements.
Thus, there still remains a need for a detection circuit which overcomes the drawback of the conventional detection circuit for a computer mouse, and which provides for simplified circuit design.